<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>将下拉列表变成多行列表</title>
</head>

<body>
    <form>
        <select id="mySelect">
            <option>苹果</option>
            <option>香蕉</option>
            <option>橙子</option>
            <option>甜瓜</option>
        </select>
        <input type="button" onclick="changeSize()" value="修改列表大小">
    </form>
    <script>
        function changeSize() {
            document.getElementById("mySelect").size = 4;
        }
    </script>
</body>

</html>